import Router from 'koa-router'
import { validator } from '../middleware/common.middleware.ts'
import {
  getPhoneCardData,
  getTodayHolidayInfo,
} from '../controller/phone.controller.ts'

const router = new Router({ prefix: '/phone' })

// 获取手机卡流量信息
router.post(
  '/getPhoneCardData',
  validator({
    card: { type: 'string', required: true },
  }),
  getPhoneCardData,
)

router.get('/getTodayHolidayInfo', getTodayHolidayInfo)

export default router
